const dbObj = require("./oprDb.js");

class DictWoker{
     constructor(){
        // console.log("数据库类： ", dbObj)
        this.db = new dbObj();
    }
    endOfTheWork(){
        this.db.disConnectionDb();
    }

    async searchWord( word ){
       let res = await  this.db.queryData( "select translation as meaning from EnWords where word = '" + word + "';");
       return res;
    }
    
}

module.exports = DictWoker;